<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>

    var person = {};
    Object.defineProperty(person, 'name', {
        writable: false,
        value: 'nice'
    })

    alert(person.name);
    person.name = 'nice2';
    delete person.name;

    alert(person.name);



</script>
</body>
</html>